/*
	memory_offsets.h

	contains definitions for important offsets in the kernel memory space.
	definitions may be virtual or physical, depending on their prefix (PHY, VIR)

	Author: Aidan Goddard 29/6/14
*/

#ifndef MEMORY_OFFSETS_H_INCLUDED
#define MEMORY_OFFSETS_H_INCLUDED

#include "types.h"

// physical offsets
#define PHYSICAL_PML4						0xe00000
#define PHYSICAL_PDP_ID						0xe01000
#define PHYSICAL_PD_ID						0xe02000
#define PHYSICAL_PDP_KERNEL					0xe03000
#define PHYSICAL_PD_KERNEL0					0xe04000

#define PHYSICAL_PAGE_MAP_PD_16_BASE		0xe05000
#define PHYSICAL_PAGE_MAP_LEFTOVER_PT		0xe15000

#define PHYSICAL_VIRTUAL_MAP_PT_BASE		0xe16000
#define PHYSICAL_PD_AREA_PT					0xe17000

#define PHYSICAL_PHYSICAL_ALLOC_CONTROL		0xe18000
#define PHYSICAL_VIRTUAL_ALLOC_CONTROL		0xe19000

#define PHYSICAL_TEMP_PT					0xe1a000

// virtual  offsets
#define VIRTUAL_PDP_KERNEL					(KOFFSET + PHYSICAL_PDP_KERNEL)
#define VIRTUAL_PD_AREA_PT					(KOFFSET + PHYSICAL_PD_AREA_PT)
#define VIRTUAL_ALLOCATION_BITMAP_2MB		(KOFFSET + 0x1000000)
#define VIRTUAL_PD_MAP_BASE					(KOFFSET + 0x1200000)
#define VIRTUAL_TEMP_PT						(KOFFSET + PHYSICAL_TEMP_PT)


#endif